package com.wyd.command.cmd;

import com.wyd.command.receiver.Light;

/**
 * @author Yudi Wang
 * @date 2022/1/27 16:30
 */
public class LightOffCommand implements Command{

    private Light light;

    public LightOffCommand(Light light) {
        this.light = light;
    }

    public void execute() {
        light.off();

    }

    public void undo() {
        light.on();
    }
}
